package com.yfyszk.kingbird.entity;



import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 系统操作日志表
 * </p>
 *
 * @author kingbird123
 * @since 2020-08-25
 */
@TableName("scp_system_log")
public class SystemLog extends Model<SystemLog> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "ID", type = IdType.AUTO)
    private Long id;
    @TableField("UNIT_ID")
    private Long unitId;
    /**
     * 操作用户ID
     */
    @TableField("USER_ID")
    private Long userId;
    /**
     * 操作时间
     */
    @TableField("CREATE_TIME")
    private Date createTime;
    /**
     * 耗时
     */
    @TableField("SPEED_TIME")
    private Integer speedTime;
    /**
     * 请求类型
     */
    @TableField("METHOD")
    private String method;
    /**
     * 用户标识
     */
    @TableField("USER_AGENT")
    private String userAgent;
    /**
     * 操作IP
     */
    @TableField("USER_IP")
    private String userIp;
    /**
     * 操作内容
     */
    @TableField("OPT_CONTENT")
    private String optContent;
    /**
     * 请求路径
     */
    @TableField("URL")
    private String url;
    /**
     * 方法描述
     */
    @TableField("METHOD_DESR")
    private String methodDesr;
    /**
     * 方法名称
     */
    @TableField("METHOD_NAME")
    private String methodName;
    /**
     * 应用平台1:admin 2:web 3:app
     */
    @TableField("PLATFORM_TYPE")
    private String platformType;
    @TableField("STATUS")
    private String status;

    public Long getId() {
        return id;
    }

    public SystemLog setId(Long id) {
        this.id = id;
        return this;
    }

    public Long getUnitId() {
        return unitId;
    }

    public SystemLog setUnitId(Long unitId) {
        this.unitId = unitId;
        return this;
    }

    public Long getUserId() {
        return userId;
    }

    public SystemLog setUserId(Long userId) {
        this.userId = userId;
        return this;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public SystemLog setCreateTime(Date createTime) {
        this.createTime = createTime;
        return this;
    }

    public Integer getSpeedTime() {
        return speedTime;
    }

    public SystemLog setSpeedTime(Integer speedTime) {
        this.speedTime = speedTime;
        return this;
    }

    public String getMethod() {
        return method;
    }

    public SystemLog setMethod(String method) {
        this.method = method;
        return this;
    }

    public String getUserAgent() {
        return userAgent;
    }

    public SystemLog setUserAgent(String userAgent) {
        this.userAgent = userAgent;
        return this;
    }

    public String getUserIp() {
        return userIp;
    }

    public SystemLog setUserIp(String userIp) {
        this.userIp = userIp;
        return this;
    }

    public String getOptContent() {
        return optContent;
    }

    public SystemLog setOptContent(String optContent) {
        this.optContent = optContent;
        return this;
    }

    public String getUrl() {
        return url;
    }

    public SystemLog setUrl(String url) {
        this.url = url;
        return this;
    }

    public String getMethodDesr() {
        return methodDesr;
    }

    public SystemLog setMethodDesr(String methodDesr) {
        this.methodDesr = methodDesr;
        return this;
    }

    public String getMethodName() {
        return methodName;
    }

    public SystemLog setMethodName(String methodName) {
        this.methodName = methodName;
        return this;
    }

    public String getPlatformType() {
        return platformType;
    }

    public void setPlatformType(String platformType) {
        this.platformType = platformType;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "SystemLog{" +
                "id=" + id +
                ", unitId=" + unitId +
                ", userId=" + userId +
                ", createTime=" + createTime +
                ", speedTime=" + speedTime +
                ", method='" + method + '\'' +
                ", userAgent='" + userAgent + '\'' +
                ", userIp='" + userIp + '\'' +
                ", optContent='" + optContent + '\'' +
                ", url='" + url + '\'' +
                ", methodDesr='" + methodDesr + '\'' +
                ", methodName='" + methodName + '\'' +
                ", platformType=" + platformType +
                ", status=" + status +
                '}';
    }
}
